typedef char*   C_CHARPTR;

// 同态加密
int NFHE_Encrypt(unsigned int pucDataInput, unsigned char *pucDataOutput);
// 同态解密
int NFHE_Decrypt(unsigned char *pucDataInput, unsigned int *pucDataOutput);

// 检测
int Sm1_InKey_EncDec(char * pPlaindata, unsigned int uByteLen, unsigned int mode, char * pbEncrypteddata);
int Sm1_WithKey_EncDec(char * pPlaindata, unsigned int uByteLen, char* pKey, unsigned int mode, char * pbEncrypteddata);

// 普通数据类型 SM1加密
int PEncS32(int Plaindata, unsigned int uiKeyIndex, unsigned char* pEncrypteddata);
int PEnc32(unsigned int Plaindata, unsigned int uiKeyIndex, unsigned char* pEncrypteddata);
int PEncS64(long long Plaindata, unsigned int uiKeyIndex, unsigned char* pEncrypteddata);
int PEnc64(unsigned long long Plaindata, unsigned int uiKeyIndex, unsigned char* pEncrypteddata);
int PEncF32(float Plaindata, unsigned int uiKeyIndex, unsigned char* pEncrypteddata);
int PEncF64(double Plaindata, unsigned int uiKeyIndex, unsigned char* pEncrypteddata);

// 普通数据类型 SM1解密
int PDecS32(unsigned char* pEncrypteddata, unsigned int uiKeyIndex, char* pFhe_Auth, int* pPlaindata);
int PDec32(unsigned char* pEncrypteddata, unsigned int uiKeyIndex, char* pFhe_Auth, unsigned int* pPlaindata);
int PDecS64(unsigned char* pEncrypteddata, unsigned int uiKeyIndex, char* pFhe_Auth, long long* pPlaindata);
int PDec64(unsigned char* pEncrypteddata, unsigned int uiKeyIndex, char* pFhe_Auth, unsigned long long* pPlaindata);
int PDecF32(unsigned char* pEncrypteddata, unsigned int uiKeyIndex, char* pFhe_Auth, float* pPlaindata);
int PDecF64(unsigned char* pEncrypteddata, unsigned int uiKeyIndex, char* pFhe_Auth, double* pPlaindata);

// 普通数据类型 SM1通用解密
int PDec(unsigned char* pEncrypteddata, unsigned int uiKeyIndex, char* pFhe_Auth, unsigned char* pPlaindata, unsigned char* pType);

// 普通数据类型 四则运算
int PAdd(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PSub(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PMul(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PDiv(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);

// 普通数据类型 比较运算（反密文）
int PComLT(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PComLTE(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PComGT(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PComGTE(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PComEQ(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PComNE(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);

// 普通数据类型 逻辑运算（反密文）
int PLogAnd(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PLogOr(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PLogNot(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);

// 普通数据类型 比较运算（反明文）
int PComLTp(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, int* pbResult);
int PComLTEp(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, int* pbResult);
int PComGTp(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, int* pbResult);
int PComGTEp(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, int* pbResult);
int PComEQp(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, int* pbResult);
int PComNEp(unsigned char* pEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* pEncryptedOp2, unsigned int uiKeyIdx2, int* pbResult);

// 大数 加密
int PEncBDecimal(char* szBDecimal, unsigned int uiKeyIndex, unsigned char* szEnc);
// 大数 解密
int PDecBDecimal(unsigned char* szEnc, unsigned int uiKeyIndex, char* pFhe_Auth, char* szBDecimal);

// 大数 四则运算
int PAddBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* szEncryptedResult, unsigned int uiKeyIdxR);
int PSubBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* szEncryptedResult, unsigned int uiKeyIdxR);
int PMulBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* szEncryptedResult, unsigned int uiKeyIdxR);
int PDivBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* szEncryptedResult, unsigned int uiKeyIdxR);

// 大数 比较运算（反密文）
int PComLTBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncrypteddata, unsigned int uiKeyIdxR);
int PComLTEBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncrypteddata, unsigned int uiKeyIdxR);
int PComGTBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncrypteddata, unsigned int uiKeyIdxR);
int PComGTEBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncrypteddata, unsigned int uiKeyIdxR);
int PComEQBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncrypteddata, unsigned int uiKeyIdxR);
int PComNEBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, unsigned char* pEncrypteddata, unsigned int uiKeyIdxR);

// 大数 比较运算（反明文）
int PComLTpBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, int* pbResult);
int PComLTEpBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, int* pbResult);
int PComGTpBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, int* pbResult);
int PComGTEpBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, int* pbResult);
int PComEQpBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, int* pbResult);
int PComNEpBd(unsigned char* szEncryptedOp1, unsigned int uiKeyIdx1, unsigned char* szEncryptedOp2, unsigned int uiKeyIdx2, int* pbResult);


unsigned int getEncStrLenFromPlainStr(char* pStr);
// 字符串 加密
int PEncStr(char* pStr, unsigned int uiKeyIndex, unsigned char* pEncStr);
// 字符串 解密
int PDecStr(unsigned char* pEncStr, unsigned int uiKeyIndex, char* pFhe_Auth, char* pStr);

// 字符串 比较运算（反明文）
int PComStrLTp(unsigned char* pEncStr1, unsigned int uiKeyIndex1, unsigned char* pEncStr2, unsigned int uiKeyIndex2, int* pResultPlain);
int PComStrLTEp(unsigned char* pEncStr1, unsigned int uiKeyIndex1, unsigned char* pEncStr2, unsigned int uiKeyIndex2, int* pResultPlain);
int PComStrGTp(unsigned char* pEncStr1, unsigned int uiKeyIndex1, unsigned char* pEncStr2, unsigned int uiKeyIndex2, int* pResultPlain);
int PComStrGTEp(unsigned char* pEncStr1, unsigned int uiKeyIndex1, unsigned char* pEncStr2, unsigned int uiKeyIndex2, int* pResultPlain);
int PComStrEQp(unsigned char* pEncStr1, unsigned int uiKeyIndex1, unsigned char* pEncStr2, unsigned int uiKeyIndex2, int* pResultPlain);
int PComStrNEp(unsigned char* pEncStr1, unsigned int uiKeyIndex1, unsigned char* pEncStr2, unsigned int uiKeyIndex2, int* pResultPlain);

// 字符串 比较运算（反密文）
int PComStrLT(unsigned char* pEncStr1, unsigned int uiKeyIndex1, unsigned char* pEncStr2, unsigned int uiKeyIndex2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PComStrLTE(unsigned char* pEncStr1, unsigned int uiKeyIndex1, unsigned char* pEncStr2, unsigned int uiKeyIndex2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PComStrGT(unsigned char* pEncStr1, unsigned int uiKeyIndex1, unsigned char* pEncStr2, unsigned int uiKeyIndex2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PComStrGTE(unsigned char* pEncStr1, unsigned int uiKeyIndex1, unsigned char* pEncStr2, unsigned int uiKeyIndex2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PComStrEQ(unsigned char* pEncStr1, unsigned int uiKeyIndex1, unsigned char* pEncStr2, unsigned int uiKeyIndex2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);
int PComStrNE(unsigned char* pEncStr1, unsigned int uiKeyIndex1, unsigned char* pEncStr2, unsigned int uiKeyIndex2, unsigned char* pEncryptedResult, unsigned int uiKeyIdxR);


// 批处理 普通数据类型 加密
int PEncS32Ex(unsigned int nCount, int* pPlaindata, unsigned int* pKeyIndex, unsigned char* pEncrypteddata);
int PEnc32Ex(unsigned int nCount, unsigned int* pPlaindata, unsigned int* pKeyIndex, unsigned char* pEncrypteddata);
int PEncS64Ex(unsigned int nCount, long long* pPlaindata, unsigned int* pKeyIndex, unsigned char* pEncrypteddata);
int PEnc64Ex(unsigned int nCount, unsigned long long* pPlaindata, unsigned int* pKeyIndex, unsigned char* pEncrypteddata);
int PEncF32Ex(unsigned int nCount, float* pPlaindata, unsigned int* pKeyIndex, unsigned char* pEncrypteddata);
int PEncF64Ex(unsigned int nCount, double* pPlaindata, unsigned int* pKeyIndex, unsigned char* pEncrypteddata);

// 批处理 普通数据类型 解密
int PDecS32Ex(unsigned int nCount, unsigned char* pEncrypteddata, unsigned int* pKeyIndex, char* pFhe_Auth, int* pPlaindata);
int PDec32Ex(unsigned int nCount, unsigned char* pEncrypteddata, unsigned int* pKeyIndex, char* pFhe_Auth, unsigned int* pPlaindata);
int PDecS64Ex(unsigned int nCount, unsigned char* pEncrypteddata, unsigned int* pKeyIndex, char* pFhe_Auth, long long* pPlaindata);
int PDec64Ex(unsigned int nCount, unsigned char* pEncrypteddata, unsigned int* pKeyIndex, char* pFhe_Auth, unsigned long long* pPlaindata);
int PDecF32Ex(unsigned int nCount, unsigned char* pEncrypteddata, unsigned int* pKeyIndex, char* pFhe_Auth, float* pPlaindata);
int PDecF64Ex(unsigned int nCount, unsigned char* pEncrypteddata, unsigned int* pKeyIndex, char* pFhe_Auth, double* pPlaindata);

// 批处理 普通数据类型 通用解密
int PDecEx(unsigned int nCount, unsigned char* pEncrypteddata, unsigned int* pKeyIndex, char* pFhe_Auth, unsigned char* pPlaindata, unsigned char* pType);

// 批处理 普通数据类型 四则运算
int PAddEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);
int PSubEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);
int PMulEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);
int PDivEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);

// 批处理 普通数据类型 比较运算（反明文）
int PComLTExp(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, int* pbResult);
int PComLTEExp(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, int* pbResult);
int PComGTExp(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, int* pbResult);
int PComGTEExp(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, int* pbResult);
int PComEQExp(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, int* pbResult);
int PComNEExp(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, int* pbResult);

// 批处理 普通数据类型 比较运算（反密文）
int PComLTEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);
int PComLTEEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);
int PComGTEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);
int PComGTEEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);
int PComEQEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);
int PComNEEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);

// 批处理 普通数据类型 逻辑运算（反密文）
int PLogAndEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);
int PLogOrEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);
int PLogNotEx(unsigned int nCount, unsigned char* pEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* pEncryptedResult, unsigned int* pKeyIdxR);

// 批处理 大数 加密
int PEncBDecimalEx(unsigned int nCount, C_CHARPTR szBDecimal[], unsigned int* pKeyIndex, unsigned char* szEnc);
int PDecBDecimalEx(unsigned int nCount, unsigned char* szEnc, unsigned int* pKeyIndex, char* pFhe_Auth, C_CHARPTR szBDecimal[]);

// 批处理 大数 解密
int PAddBdEx(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* szEncryptedResult, unsigned int* pKeyIdxR);
int PSubBdEx(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* szEncryptedResult, unsigned int* pKeyIdxR);
int PMulBdEx(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* szEncryptedResult, unsigned int* pKeyIdxR);
int PDivBdEx(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* szEncryptedResult, unsigned int* pKeyIdxR);

// 批处理 大数 比较运算（反密文）
int PComLTBdEx(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* szEncryptedResult, unsigned int* pKeyIdxR);
int PComLTEBdEx(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* szEncryptedResult, unsigned int* pKeyIdxR);
int PComGTBdEx(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* szEncryptedResult, unsigned int* pKeyIdxR);
int PComGTEBdEx(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* szEncryptedResult, unsigned int* pKeyIdxR);
int PComEQBdEx(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* szEncryptedResult, unsigned int* pKeyIdxR);
int PComNEBdEx(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, unsigned char* szEncryptedResult, unsigned int* pKeyIdxR);

// 批处理 大数 比较运算（反明文）
int PComLTBdExp(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, int* pbResult);
int PComLTEBdExp(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, int* pbResult);
int PComGTBdExp(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, int* pbResult);
int PComGTEBdExp(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, int* pbResult);
int PComEQBdExp(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, int* pbResult);
int PComNEBdExp(unsigned int nCount, unsigned char* szEncryptedOp1, unsigned int* pKeyIdx1, unsigned char* szEncryptedOp2, unsigned int* pKeyIdx2, int* pbResult);

void Bn2Str(char *pbDest, unsigned char *pbSrc, int nLen);

int NFHE_SM3(char* In, unsigned int InLength, char* Out);

int NFHE_SM3_ID(char* pucPublicKey, char* pucID, unsigned int IdLength, char* In, unsigned int InLength, char* Out);

int NFHE_SM3_ID_Without_Key(char* pucID, unsigned int IdLength, char* In, unsigned int InLength, char* Out);